<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Minimal and Clean Sign up / Login and Forgot Form by
	FreeHTML5.co</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Free HTML5 Template by FreeHTML5.co" />
<meta name="keywords"
	content="free html5, free template, free bootstrap, html5, css3, mobile first, responsive" />




<!-- Facebook and Twitter integration -->
<meta property="og:title" content="" />
<meta property="og:image" content="" />
<meta property="og:url" content="" />
<meta property="og:site_name" content="" />
<meta property="og:description" content="" />
<meta name="twitter:title" content="" />
<meta name="twitter:image" content="" />
<meta name="twitter:url" content="" />
<meta name="twitter:card" content="" />

<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<link rel="shortcut icon" href="favicon.ico">

<link
	href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,300'
	rel='stylesheet' type='text/css'>

<link rel="stylesheet" href="bootstrapusers/css1/bootstrap.min.css">
<link rel="stylesheet" href="bootstrapusers/css1/animate1.css">
<link rel="stylesheet" href="bootstrapusers/css1/style3.css">
<link rel="stylesheet" href="layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="layuiadmin/style/admin.css" media="all">
<link rel="stylesheet" href="layuiadmin/style/login.css" media="all">


<!-- Modernizr JS -->
<script src="bootstrapusers/js1/modernizr-2.6.2.min.js"></script>
<!-- FOR IE9 below -->
<!--[if lt IE 9]>
	<script src="js/respond.min.js"></script>
	<![endif]-->

</head>
<body class="style-2">

	<div class="container">
		<div class="row">
			<div class="col-md-12 text-center">
				<ul class="menu">

				</ul>
			</div>
		</div>
		<div class="row">
			<div class="col-md-4"></div>
			<div class="col-md-4"></div>
			<div class="col-md-4">


				<!-- Start Sign In Form -->
				<form method="post" class="fh5co-form animate-box"
					data-animate-effect="fadeInLeft" id="formobj">
					<h2>Sign In</h2>
					<div class="form-group">
						<label for="username" class="sr-only">Username</label> <input
							type="text" class="form-control" id="userName" name="userName"
							placeholder="用户名" autocomplete="off">
					</div>
					<div class="form-group">
						<label for="password" class="sr-only">Password</label> <input
							type="password" class="form-control" id="userPwd" name="userPwd"
							placeholder="密码" autocomplete="off">
					</div>
					<div class="form-group">
						<label for="remember"><input type="checkbox" id="remember">
							记住我</label>
					</div>
					<div class="form-group">
						<p>
							没有注册? <a href="register">注册</a>
						</p>
					</div>
					<br>
					<div class="form-group">
						<input type="button" lay-filter="LAY-user-login-submit" value="登录"
							class="btn btn-primary" id="loginUser">&nbsp;&nbsp;&nbsp;&nbsp;
		
					</div>
				</form>
				<!-- END Sign In Form -->

			</div>
		</div>
		<div class="row" style="padding-top: 60px; clear: both;"></div>
	</div>

	<!-- jQuery -->
	<script src="bootstrapusers/js1/jquery.min.js"></script>
	<!-- Bootstrap -->
	<script src="bootstrapusers/js1/bootstrap.min.js"></script>
	<!-- Placeholder -->
	<script src="bootstrapusers/js1/jquery.placeholder.min.js"></script>
	<!-- Waypoints -->
	<script src="bootstrapusers/js1/jquery.waypoints.min.js"></script>
	<!-- Main JS -->
	<script src="bootstrapusers/js1/main.js"></script>

</body>

<script src="layuiadmin/layui/layui.js"></script>
<script type="text/javascript">
	$(function() {
		$("#loginUser").click(function() {
			$.ajax({
				url : "usersapi/getUser",
				type : "post",
				data : $("#formobj").serialize(),

				/* dateType:'json', */
				success : function(data) {
					if (data.msg == "登入成功") {
						location.href = 'personalpage'; //后台个人中心
					}
					if (data.msg == "登录失败") {
						//登入成功的提示与跳转
						alert("账号或者密码错误")
					}
				},
			});
		});
	})
</script>
</html>